3.1.26 \(\int \frac {A+B x}{x \sqrt {a+b x^2}} \, dx\)

Optimal. Leaf size=53 \[ \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {844, 217, 206, 266, 63, 208} \begin {gather*} \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x*Sqrt[a + b*x^2]),x]

[Out]

(B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b] - (A*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/Sqrt[a]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 844

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {A+B x}{x \sqrt {a+b x^2}} \, dx &=A \int \frac {1}{x \sqrt {a+b x^2}} \, dx+B \int \frac {1}{\sqrt {a+b x^2}} \, dx\\ &=\frac {1}{2} A \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,x^2\right )+B \operatorname {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )\\ &=\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}+\frac {A \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{b}\\ &=\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 53, normalized size = 1.00 \begin {gather*} \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x*Sqrt[a + b*x^2]),x]

[Out]

(B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/Sqrt[b] - (A*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]])/Sqrt[a]

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.20, size = 70, normalized size = 1.32 \begin {gather*} \frac {2 A \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}-\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {B \log \left (\sqrt {a+b x^2}-\sqrt {b} x\right )}{\sqrt {b}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(A + B*x)/(x*Sqrt[a + b*x^2]),x]

[Out]

(2*A*ArcTanh[(Sqrt[b]*x)/Sqrt[a] - Sqrt[a + b*x^2]/Sqrt[a]])/Sqrt[a] - (B*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]])
/Sqrt[b]

________________________________________________________________________________________

fricas [A]  time = 1.29, size = 273, normalized size = 5.15 \begin {gather*} \left [\frac {B a \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + A \sqrt {a} b \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, -\frac {2 \, B a \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - A \sqrt {a} b \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, \frac {2 \, A \sqrt {-a} b \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) + B a \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right )}{2 \, a b}, -\frac {B a \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - A \sqrt {-a} b \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right )}{a b}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[1/2*(B*a*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + A*sqrt(a)*b*log(-(b*x^2 - 2*sqrt(b*x^2 + a
)*sqrt(a) + 2*a)/x^2))/(a*b), -1/2*(2*B*a*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - A*sqrt(a)*b*log(-(b*x^
2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2))/(a*b), 1/2*(2*A*sqrt(-a)*b*arctan(sqrt(-a)/sqrt(b*x^2 + a)) + B*a*s
qrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a))/(a*b), -(B*a*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a
)) - A*sqrt(-a)*b*arctan(sqrt(-a)/sqrt(b*x^2 + a)))/(a*b)]

________________________________________________________________________________________

giac [A]  time = 0.50, size = 58, normalized size = 1.09 \begin {gather*} \frac {2 \, A \arctan \left (-\frac {\sqrt {b} x - \sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - \frac {B \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{\sqrt {b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

2*A*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/sqrt(-a) - B*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a)))/sqrt(b
)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 52, normalized size = 0.98 \begin {gather*} -\frac {A \ln \left (\frac {2 a +2 \sqrt {b \,x^{2}+a}\, \sqrt {a}}{x}\right )}{\sqrt {a}}+\frac {B \ln \left (\sqrt {b}\, x +\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x/(b*x^2+a)^(1/2),x)

[Out]

B*ln(b^(1/2)*x+(b*x^2+a)^(1/2))/b^(1/2)-A/a^(1/2)*ln((2*a+2*(b*x^2+a)^(1/2)*a^(1/2))/x)

________________________________________________________________________________________

maxima [A]  time = 1.38, size = 33, normalized size = 0.62 \begin {gather*} \frac {B \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} - \frac {A \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{\sqrt {a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

B*arcsinh(b*x/sqrt(a*b))/sqrt(b) - A*arcsinh(a/(sqrt(a*b)*abs(x)))/sqrt(a)

________________________________________________________________________________________

mupad [B]  time = 1.30, size = 42, normalized size = 0.79 \begin {gather*} \frac {B\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}}-\frac {A\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x*(a + b*x^2)^(1/2)),x)

[Out]

(B*log(b^(1/2)*x + (a + b*x^2)^(1/2)))/b^(1/2) - (A*atanh((a + b*x^2)^(1/2)/a^(1/2)))/a^(1/2)

________________________________________________________________________________________

sympy [A]  time = 5.14, size = 99, normalized size = 1.87 \begin {gather*} - \frac {A \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{\sqrt {a}} + B \left (\begin {cases} \frac {\sqrt {- \frac {a}{b}} \operatorname {asin}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b < 0 \\\frac {\sqrt {\frac {a}{b}} \operatorname {asinh}{\left (x \sqrt {\frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b > 0 \\\frac {\sqrt {- \frac {a}{b}} \operatorname {acosh}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- a}} & \text {for}\: b > 0 \wedge a < 0 \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b*x**2+a)**(1/2),x)

[Out]

-A*asinh(sqrt(a)/(sqrt(b)*x))/sqrt(a) + B*Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), (a > 0) & (b < 0))
, (sqrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a), (a > 0) & (b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), (b > 0)
 & (a < 0)))

________________________________________________________________________________________